#ifndef _UTIL_LAZY_SELECTOR_H
#define _UTIL_LAZY_SELECTOR_H

#include "LADSUtil/hash_map.h"

namespace LADSUtil {

  class lazy_selector {
    public:
      lazy_selector(int n) : _n(n),_v(-1) { }
      virtual ~lazy_selector() {}
      bool empty() const {return _n==0;}
      int operator()();
    protected:
      virtual int select()=0;
      int _n;
      hash_map<int,int> _map;
      int _v;
  };

} //~namespace LADSUtil

#endif
